﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

using PowerCreator.LMS.Common.Script;
using PowerCreator.LMS.Web.Course;
using PowerCreator.LMS.Course.Entity;
using PowerCreator.LMS.Web.Catalog;
using PowerCreator.LMS.ViewQuery;

public partial class Theme_Index_UserControls_CourseClickTaxis : System.Web.UI.UserControl
{
    protected PowerCreator.LMS.Web.Config.WebConfig config = new PowerCreator.LMS.Web.Config.WebConfig();
    PowerCreator.LMS.Web.Course.Course obj = new Course();
    protected void Page_Load(object sender, EventArgs e)
    {
        BinderCourseClick();
    }
    private void BinderCourseClick()
    {
        //点击排行
        string search = "CourseState = 1";
        string orderBy = "CourseResourceNum desc ";
        DataTable dt = obj.QueryCourse(search, orderBy, 5, 1);
        dt.Columns.Add("i");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dt.Rows[i]["i"] = i + 1;
        }
        rptCourse.DataSource = dt;
        rptCourse.DataBind();
    }
}
